﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<DR.WebUI.Models.Project.NewProject>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Project
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h3>Create Project</h3>

    <%Html.EnableClientValidation(); %>
    <% using (Html.BeginForm("Create", "Project"))
       {%>
    <div>
         <table>
                <tr>
                    <td class="tableBold">
                        <%:Html.Label("Project Name:")%>
                    </td>
                     <td>
                        <%:Html.TextBox("ProjectName", null, new { @class = "modalTextBox" })%>
                        <br />
                        <%:Html.ValidationMessageFor(model => model.ProjectName)%>
                    </td>
                </tr>
                <tr>
                    <td class="tableBold">
                        <%:Html.Label("Start Date:")%>
                    </td>
                    <td>
                        <input type="text" id="Date" name="StartDate" value="<%=Model.StartDate.ToShortDateString() %>" class="miniTextBox" />
                        <br />
                        <%:Html.ValidationMessageFor(model => model.StartDate)%>
                    </td>
                </tr>
                <tr>
                    <td class="tableBold">
                        <%:Html.Label("Finish Date:")%>
                    </td>
                    <td>
                        <input type="text" id="Date1" name="FinishDate" class="miniTextBox" />
                        <br />
                        <%:Html.ValidationMessageFor(model => model.FinishDate)%>
                    </td>
                </tr>
                <tr>
                    <td class="tableBold">
                        <%:Html.Label("Status:")%>
                    </td>
                    <td>
                        <%: Html.DropDownList("Status", (IList<SelectListItem>)ViewData["ProjectStatuses"])%>
                        <br />
                        <div class="field-validation-error" id="errors"/>
                        <%:Html.ValidationMessageFor(model => model.Status)%>
                    </td>
                </tr>
                <tr>          
                     <td colspan="2">
                        <b>
                            <%:Html.Label("Description:")%>
                        </b>
                        <br />
                        <%:Html.TextArea("Description", null, new { @class = "descriptionTextArea" })%>
                        <br />
                        <%:Html.ValidationMessageFor(model => model.Description)%>
                    </td>
                </tr> 
                <tr>
                    <td>
                    </td>
                    <td style="text-align:right;">
                        <input type="submit" value="Add" id="add" style="width:100px;"/>
                        <input type="button" value="Cancel" id="cancel" style="width:100px;" onclick="window.location.href='/Project/List'"/>
                    </td>
                </tr>
         </table>
    </div>
    <%}%>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="headPlaceHolder" runat="server">
    <script type="text/javascript" src="<%= Url.Content("~/Scripts/MicrosoftAjax.js")%>"></script>
    <script type="text/javascript" src="<%= Url.Content("~/Scripts/MicrosoftMvcValidation.js")%>"></script>
    <script type="text/javascript" src="<%= Url.Content("~/Scripts/jquery-1.4.4.min.js")%>"></script>
    <script type="text/javascript" src="<%= Url.Content("~/Scripts/jquery-ui-1.8.7.custom.min.js")%>"></script>
    <link type="text/css" href="<%= Url.Content("~/Content/jquery/jquery-ui-1.8.7.custom.css")%>" rel="stylesheet" />

    <script type="text/javascript" language="javascript">
        $(function () {
            $("#Date").datepicker();
            $("#Date1").datepicker();
            $("#add").button();
            $("#cancel").button();
        });
	</script>

</asp:Content>